package com.zl.spring.service;

import com.zl.spring.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Repository
public class UserService {

    @Autowired
    @Qualifier(value = "userDao")
    @Resource(name = "userDaov")
    private UserDao userDao;

    @Value(value = "abc")
    private String name;

    public void getUserService(){
        System.out.printf("jiazaileUserService");
    }

    @Override
    public String toString() {
        userDao.getUserDao();
        return "UserService{}";
    }
}
